package com.wind.cloud.zero.feign;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import com.wind.cloud.zero.domain.User;
import com.wind.cloud.zero.feign.fallback.RemoteUserFacllbackFactory;

//@FeignClient(value = "CLOUD-ZERO-USER")
@FeignClient(value = "CLOUD-ZERO-USER", fallbackFactory = RemoteUserFacllbackFactory.class)
public interface RemoteUserService
{
    @GetMapping("user/get/{id}")
    public User get(@PathVariable(value = "id") Integer id);

    @GetMapping("user/list")
    public List<User> list();
}
